package cn.bearspark.merit.provider.dao.key;

import cn.bearspark.framework.redis.starter.key.RedisKeyBuilder;
import org.springframework.stereotype.Component;

/**
 * 积功德的用户 id 缓存的构键器
 *
 * @author f
 */
@Component
public class AccMeritUserIdBufferKeyBuilder extends RedisKeyBuilder {

    /**
     * 积功德的用户 id 的 ZSet 缓存的键的前缀
     */
    private static final String ACC_MERIT_USER_ID_ZSET = "accMeritUserIdZSet";

    public String buildAccMeritUserIdZSetKey(int moduleCode, long userId) {
        return super.getPrefix() + ACC_MERIT_USER_ID_ZSET +
               super.getSplitItem() + moduleCode +
               super.getSplitItem() + userId;
    }
}
